package com.fc.example.adapter;

import android.app.Application;

import com.yfanads.android.YFAdsConfig;
import com.yfanads.android.YFAdsManager;

/**
 * SDK初始化
 **/
public class YFInit {

    private static boolean isInit;

    public static String sdkVersion = "v6.0.4.0";
    public static String networkName = "YF";

    public synchronized static void init(Application application, String appId) {
        if (isInit) {
            return;
        }
        YFAdsConfig adsConfig = new YFAdsConfig.YFAdsConfigBuilder(appId)
                .builder();
        // 以下参数根据需求传入
//        adsConfig.setAppName("");
//        adsConfig.setAppPackage("");
//        adsConfig.setAppVer("");
//        adsConfig.setCanUseAppList(true);
//        adsConfig.setCanUseAndroidId(true);
//        adsConfig.setCanUseLocation(true);
//        adsConfig.setCanUseOaid(true);
//        adsConfig.setCanUseWifiState(true);
//        adsConfig.setCanUsePhoneState(true);
//        adsConfig.setCanUseWriteExternal(true);
        YFAdsManager.getInstance().init(application, adsConfig);
        isInit = true;
    }
}
